import request from '@/config/axios'

// 注销记录 VO
export interface LogoutRecordsVO {
  id: number // 编号
  userId: number // 用户编号
  feedback: string // 详细意见
  otherReason: string // 其他意见
  contactPhone: string // 联系电话
  status: number // 处理状态
  processorId: number // 处理人员
  processedTime: Date // 处理时间
  processResult: string // 处理结果
}

// 注销记录 API
export const LogoutRecordsApi = {
  // 查询注销记录分页
  getLogoutRecordsPage: async (params: any) => {
    return await request.get({ url: `/member/logout-records/page`, params })
  },

  // 查询注销记录详情
  getLogoutRecords: async (id: number) => {
    return await request.get({ url: `/member/logout-records/get?id=` + id })
  },

  // 新增注销记录
  createLogoutRecords: async (data: LogoutRecordsVO) => {
    return await request.post({ url: `/member/logout-records/create`, data })
  },

  // 修改注销记录
  updateLogoutRecords: async (data: LogoutRecordsVO) => {
    return await request.put({ url: `/member/logout-records/update`, data })
  },

  // 删除注销记录
  deleteLogoutRecords: async (id: number) => {
    return await request.delete({ url: `/member/logout-records/delete?id=` + id })
  },

  // 导出注销记录 Excel
  exportLogoutRecords: async (params) => {
    return await request.download({ url: `/member/logout-records/export-excel`, params })
  },
}